<template>
  <div class="card">
    <p>{{ store.state.count }}</p>
    <button type="button" @click="store.commit('changeCount')">同步修改</button> 
    <button type="button" @click="store.dispatch('changeCountAsync', 5)">异步修改</button>
  </div>
</template>
<script setup>
import { useStore } from 'vuex'
const store = useStore()
console.log('store: ', store.state.count);
</script>
<style scoped>
.read-the-docs {
  color: #888;
}
</style>
